package com.kl.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.kl.entity.TabOrder;
import com.kl.entity.Waybill;
import com.kl.mapper.TabOrderMapper;
import com.kl.mapper.WaybillMapper;
import com.kl.service.IWaybillService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2021-11-02
 */
@Service
public class WaybillServiceImpl extends ServiceImpl<WaybillMapper, Waybill> implements IWaybillService {


    @Autowired
    private WaybillMapper waybillMapper;

    @Override
    public List<Waybill> findWaybillByOrderId(Long orderId) {
        QueryWrapper<Waybill> queryWrapper = new QueryWrapper();
        queryWrapper.eq("order_id",orderId);
        List<Waybill> waybills = waybillMapper.selectList(queryWrapper);
        return waybills;
    }
}
